#ifndef APPOINTMENT_DAIRY_H
#define APPOINTMENT_DAIRY_H

#include <vector>
#include <algorithm>
#include <iomanip>
#include <iostream>

#include "Day.h"
#include "ADException.h"

using namespace std;

class AppointmentDairy {

	friend ostream &operator<< (ostream& os, const AppointmentDairy& AD);

protected:

	vector<Day> days_;

	bool intersects (const Appointment & app);

public:

	AppointmentDairy();
	~AppointmentDairy() {};
	AppointmentDairy(const AppointmentDairy & diary); // Copy CTOR
	
	AppointmentDairy & operator= (const AppointmentDairy & diary);


	virtual void addAppointment(const int & day_index, const int & start_hour, const int & start_min,
							const int & end_hour, const int & end_min, const string & subject);
	virtual void removeAppointment(const Appointment & app);
	virtual const Appointment * find(const int & day_index, const int & start_hour, const int & start_min) const;
	virtual void copyAppointment(const Appointment & app, const int & day_index, const int & start_hour, const int & start_min);

	virtual inline const vector<Day> & getDays() const { return days_; };
};

#endif